(function($){
	var __temp = $.fn.validate;
	
	$.fn.cmsvalidate = function(opts){
		var defaultOpts = {
			rules : {
				name: "required",
				username : "required",
				nickname: "required",
				OriginalPassword : {
					required : true,
					minlength : 3
				},
				password : {
					required : true,
					minlength : 3
				},
				confirmPwd : {
					equalTo : "#password"
				},
				title : "required",
				channelId : {
					min : 1
				},
				storeName : "required",
				linkUrl : "required"
			},
			messages : {
				name: "名称不能为空",
				username : "用户名不能为空",
				nickname: "昵称不能为空",
				OriginalPassword : {
					required : "密码不能为空",
					minlength : "密码长度至少为3"
				},
				password : {
					required : "密码不能为空",
					minlength : "密码长度至少为3"
				},
				confirmPwd : "确定密码必须和原密码一致",
				title : "标题不能为空",
				channelId : "栏目不能为空",
				storeName : "上传文件不能为空",
				linkUrl : "链接地址不能为空"
			},
			errorElement : "span",
			errorClass : "errorContainer"
		};
		
		$.extend($.fn.validate.prototype, defaultOpts);
		__temp.call(this, defaultOpts);
		return this;
	}
})(jQuery);